package com.lovegu.object.up;

/**
 * @author 老顾
 * @title: Car
 * @projectName java-restudy
 * @email: 1437594522@qq.com
 * @date 2022/9/20 17:07
 */
public class Car {
    String color = "red";
    int num = 4;
    void show(){
        System.out.println("color="+color+"..num="+num);
    }
}
class CarTest {
    public static void main(String[] args) {
        Car c1 = new Car(); //建立对象c1
        Car c2 = new Car(); //建立对象c2
        c1.color = "blue"; //对对象的属性进行修改
        c1.show(); //使用对象的方法
        c2.show();
    }
}
